#ifndef BITBOARD_INIT_H
#define BITBOARD_INIT_H

#include <stdint.h>
#include "bitboard.h"

extern bitboard rank_attacks[64][64]; // 32 kilobytes
extern bitboard file_attacks[64][64];
extern bitboard diaga1h8_attacks[64][64];
extern bitboard diaga8h1_attacks[64][64];

extern bitboard knight_attacks[64];
extern bitboard king_attacks[64];
extern bitboard pawn_attacks[2][64];
extern bitboard pawn_moves[2][64];

//extern board_t cur_board;
//extern bitboard pieces_rl90;
//extern bitboard pieces_rl45;
//extern bitboard pieces_rr45;

extern bitboard piece_setmask[64];
extern bitboard piece_setmask_rl90[64];
extern bitboard piece_setmask_rl45[64];
extern bitboard piece_setmask_rr45[64];

extern int coord_map_rl90[64];
extern int coord_map_rl45[64];
extern int coord_map_rr45[64];




board_t clear_board();
board_t reset_board();

void generate_piece_setmasks();

bitboard map_to_bitboard(bitboard s, bitboard *setmask);
bitboard_set map_to_bitboard_set(bitboard_set s, bitboard *setmask);

void generate_knight_attacks();
void generate_king_attacks();
void generate_pawn_attacks();
void generate_rank_attacks();
void generate_file_attacks();
void generate_diag_attacks();
void bitboard_system_init();

#endif

